<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.14.0/css/all.min.css">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css">

<script class="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"yoursite.com","root":"/","scheme":"Gemini","version":"8.0.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"i18n":{"placeholder":"Searching...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"}};
  </script>

  <meta property="og:type" content="website">
<meta property="og:title" content="lungyam&#39;s blog">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="lungyam&#39;s blog">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="lungyam">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="http://yoursite.com/">


<script class="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : true,
    isPost : false,
    lang   : 'en'
  };
</script>

  <title>lungyam's blog</title>
  






  <noscript>
  <style>
  body { margin-top: 2rem; }

  .use-motion .menu-item,
  .use-motion .sidebar,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header {
    visibility: visible;
  }

  .use-motion .header,
  .use-motion .site-brand-container .toggle,
  .use-motion .footer { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle,
  .use-motion .custom-logo-image {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line {
    transform: scaleX(1);
  }

  .search-pop-overlay, .sidebar-nav { display: none; }
  .sidebar-panel { display: block; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar">
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">lungyam's blog</h1>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>







</div>
        
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-overview-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <!--noindex-->
      <section class="post-toc-wrap sidebar-panel">
      </section>
      <!--/noindex-->

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">lungyam</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives">
          <span class="site-state-item-count">7</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
  </nav>
</div>



      </section>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner index posts-expand">
      

      
      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/11/06/%E9%9B%86%E5%90%88%E4%B8%8E%E6%B3%9B%E5%9E%8B/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="lungyam">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="lungyam's blog">
    </span>

    
    
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/11/06/%E9%9B%86%E5%90%88%E4%B8%8E%E6%B3%9B%E5%9E%8B/" class="post-title-link" itemprop="url">集合与泛型</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>
      

      <time title="Created: 2020-11-06 19:56:06 / Modified: 19:57:18" itemprop="dateCreated datePublished" datetime="2020-11-06T19:56:06+08:00">2020-11-06</time>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p><strong>Java集合</strong></p>
<p>Java集合体系：Set、List、Map、Queue（集合中存放的都是对象 / 引用类型变量）</p>
<p>Set集合无序不可重复，List集合有序可重复，Map集合具有映射关系，Queue是队列。</p>
<p>Set、List、Map三种集合接口，最常用的实现类是HashSet、ArrayList、HashMap。</p>
<p>哈希表里存储元素的位置被称为“桶 (bucket)”</p>
<p>Iterator迭代器遍历集合元素：boolean hasNext() 被迭代的集合是否还有元素、Object next() 返回集合里的下一个元素、void remove() 删除集合里上一次next方法返回的元素。</p>
<p>Iterator迭代过程是值传递，不能改变集合元素本身的值，只能通过remove删除上一次next返回的集合元素。</p>
<p>foreach循环遍历集合元素，foreach循环过程也是值传递，无法修改集合元素的值，系统只是依次将集合元素的值赋给迭代变量。</p>
<p>对于所有内部基于数组的集合实现，如ArrayList、Vector等，使用随机访问的速度比使用Iterator迭代访问的性能要好，因为随机访问会被映射成对数组元素的访问。</p>
<p><img src="/images/%E5%AE%B9%E5%99%A8%E5%AF%B9%E6%AF%94.jpg" alt="容器对比"></p>
<p><strong>Java泛型</strong></p>
<p>泛型实质：允许在定义接口、类时指定类型形参，类型形参在整个接口、类体内中可当成类型使用，几乎所有可使用其他普通类型的地方都可以使用这种类型形参。</p>
<p>泛型和数组有所不同，假设Foo是Bar的一个子类型（子类或者子接口），那么 Foo[] 依然是 Bar[] 的子类型，但 G<Foo> 不是 G<Bar> 的子类型。</Bar></Foo></p>
<p>例如：List<String>类不是List<Object>类的子类，但String[] 是 Object[] 的子类。</Object></String></p>
<p>▲类型通配符上限，下限、泛型类、泛型接口、泛型方法。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/10/30/Java%E5%9F%BA%E7%A1%80/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="lungyam">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="lungyam's blog">
    </span>

    
    
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/10/30/Java%E5%9F%BA%E7%A1%80/" class="post-title-link" itemprop="url">Java基础</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>
      

      <time title="Created: 2020-10-30 19:11:40 / Modified: 19:23:19" itemprop="dateCreated datePublished" datetime="2020-10-30T19:11:40+08:00">2020-10-30</time>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p><strong>Java基础笔记</strong></p>
<p>1.static是静态修饰符，可用于修饰变量、方法、内部类等。（类属性和实例属性，静态方法和实例方法。static的作用是把类的成员变成类相关，而不是实例相关，static修饰的成员属于整个类，而不属于单个对象。）</p>
<p>​        静态变量的定义必须写在方法之外，因为静态变量为这个类公共拥有，不属于某个方法，在未赋初始值时系统会默认为静态变量赋初始值。类属性的生命周期随着类的存在而存在，实例属性的生命周期随着实例的存在而存在。</p>
<p>​        因为类成员的作用域大于实例成员的作用域，所以静态成员不能直接访问非静态成员，需要用对象。否则可能会由于静态变量先初始化而实例变量未初始化，在访问时发生未定义等大量错误。</p>
<p>​        使用static修饰的方法属于这个类，或者说属于这个类的所有对象公共拥有，调用方法为”类.方法()”。未使用static修饰的方法为这个类的某个对象(自己new出来的)所拥有，调用方法为”对象.方法()”。</p>
<p><img src="/images/test.jpg" alt="test"></p>
<p>访问控制符 (访问控制级别由小到大)：private -&gt; default -&gt; protected -&gt; public</p>
<p><img src="/images/%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6%E8%8C%83%E5%9B%B4.jpg" alt="访问控制范围"></p>
<p><img src="/images/%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6%E7%AC%A6.jpg" alt="访问控制符"></p>
<p>2.return用于结束一个方法并返回一个基本数据类型或引用类型(对象)，当没有返回值时就直接结束一个方法，也可与continue，break 一样用于循环语句或条件判断语句中。</p>
<p>3.类的复用：继承与组合。</p>
<p>继承是对已有的类改造成适用于某些特定需求的类 (override 覆写 / 重写)。(子类继承父类)</p>
<p>组合是当两个类有明显的整体、部分的关系时，将一个类作为另一个类的属性，嵌入到该类中并实现特定的功能。(嵌入类嵌入被嵌入类)</p>
<p>两者的系统开销本质上并无差别。继承的super关键字调用父类方法时，系统隐式的创建了父类的对象，super关键字引用的就是该对象。组合则是显示的创建了嵌入类的对象。所以总的系统开销并无差别。</p>
<p>4.抽象类(abstract) 和 接口(interface)。抽象类和接口都是从多个子类中抽象出来的共同特征，但抽象类主要作为多个类的模板，而接口则定义了多个类应该遵守的规范。</p>
<p>5.instanceof运算符：obj instanceof class，前面的参数是对象 / 引用类型变量，后面的参数是类 / 接口，如果前面的对象是后面的类、子类、实现类的实例，则返回true。</p>
<p>6.final修饰符：可以修饰变量、方法、类。</p>
<p>final修饰基本数据类型变量只能初始化一次，不可再次赋值（变为常量了）；修饰引用类型变量初始化后，不能改变引用，但可以改变引用的对象的属性。</p>
<p>final修饰的方法不可被重写（继承后子类不可重写父类的final修饰后的方法），但依旧可以重载。</p>
<p>final修饰的类不能被继承，该类不可有子类。</p>
<p>7.== 和 equals 比较运算符。</p>
<p>== 用于基本数据类型时，数值相等返回true；用于引用类型时，指向同一对象返回true。（Java中通过new关键字创造出来的都是新的对象 / 引用类型数据，一个新的引用，但引用的可能是同一个对象）（构造器负责创造新的对象的引用）</p>
<p>equals 只是在判断两个变量的值，用于基本数据类型、引用类型时，都是在判断”值相等”。</p>
<p>8.valueOf() 用于返回给定参数的值（基本数据类型、String的原生值）。</p>
<p>9.抽象类不能用于创建实例，只能被其子类继承。抽象类中的抽象方法必须由子类提供实现(子类重写父类的抽象方法)。</p>
<p>final修饰的类不能被继承，所以final修饰的方法也不能被重写，因此final 和 abstract 不能同时使用。</p>
<p>抽象类没有方法体，没有方法可以调用，static修饰的方法为静态方法可以直接被类调用，所以static 和 abstrcat 也不能同时修饰某个方法。</p>
<p>abstract 修饰的方法必须被其子类重写才有意义，所以abstract 方法不能定义为private访问权限，即private 和 abstract不能同时使用。</p>
<p> 10.接口 (interface)。接口里不能包含普通方法，接口里都是抽象方法。接口的好处是让规范和实现分离。</p>
<p>接口–&gt; 类 –&gt; 对象，类是接口的实现，对象是类的实例化。</p>
<p><img src="/images/%E6%8A%BD%E8%B1%A1%E5%B1%82%E6%AC%A1.jpg" alt="抽象层次"></p>
<p>11.对象在内存中的状态：</p>
<p><img src="/images/%E5%AF%B9%E8%B1%A1%E7%8A%B6%E6%80%81%E8%BD%AC%E6%8D%A2.jpg" alt="对象状态转换"></p>
<ol start="12">
<li><p>String str = new String(“hello”);  与  String str = “hello”;</p>
<p>JVM有栈内存(stack)、堆内存(heap)，堆内存中有字符串常量池用于存储字符串常量。简单理解：栈中存放对象(引用)，堆中存放数据。</p>
</li>
</ol>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/09/08/believe/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="lungyam">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="lungyam's blog">
    </span>

    
    
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/09/08/believe/" class="post-title-link" itemprop="url">believe</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2020-09-08 13:14:00" itemprop="dateCreated datePublished" datetime="2020-09-08T13:14:00+08:00">2020-09-08</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">Edited on</span>
        <time title="Modified: 2020-11-06 19:59:20" itemprop="dateModified" datetime="2020-11-06T19:59:20+08:00">2020-11-06</time>
      </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <h2 id="永远相信美好的事情即将发生"><a href="#永远相信美好的事情即将发生" class="headerlink" title="永远相信美好的事情即将发生"></a><strong>永远相信美好的事情即将发生</strong></h2>
      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/07/19/Java%E8%BF%90%E7%AE%97%E7%AC%A6%E4%B8%80%E8%A7%88/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="lungyam">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="lungyam's blog">
    </span>

    
    
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/07/19/Java%E8%BF%90%E7%AE%97%E7%AC%A6%E4%B8%80%E8%A7%88/" class="post-title-link" itemprop="url">Java运算符一览</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>
      

      <time title="Created: 2020-07-19 13:47:58 / Modified: 13:57:46" itemprop="dateCreated datePublished" datetime="2020-07-19T13:47:58+08:00">2020-07-19</time>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p>1.算术运算符：+，-，*，/，%，++，–  </p>
<p>2.位运算符：&amp;，|，~，^，&lt;&lt;，&gt;&gt;，&gt;&gt;&gt;<br>(&lt;&lt;,&gt;&gt;,&gt;&gt;&gt;分别是左移，右移，无符号右移。左移空位用0填充；右移空位用符号位填充；无符号右移用0填充，因为用0填充，所以结果总是一个正数)</p>
<p>(位运算符操作的是二进制数，将操作数转换二进制数后再进行运算，负数在计算机中以二进制补码的形式存在。符号位不变，原码取反后加一得出负数的补码。正数其实也是这样表示，只不过正数的原反补码都相同，不用进行转换。)</p>
<p>3.赋值运算符：=<br>(与其他运算符结合：+=，-=，*=，/=，%=，&amp;=，|=，^=，&lt;&lt;=，&gt;&gt;=，&gt;&gt;&gt;=)</p>
<p>4.比较运算符：&gt;，&gt;=，&lt;，&lt;=，==，!=（运算结果为布尔型：true or false）</p>
<p>5.逻辑运算符：&amp;&amp;，&amp;，||，|，！，^<br>(与，不短路与，或，不短路或，非，异或)<br>(&amp;&amp; 与 &amp;，|| 与 | 的区别：当 &amp;&amp; / || 左边的操作数为 false / true 时，不计算右边的操作数，直接返回 false / true。而 &amp; / | 两边的操作数都会计算。这便是不短路的意思。)</p>
<p>6.三目运算符 ： ? :<br>语法格式：(expression) ? (result1) : (result2)。expression为true返回result1，为false返回result2。<br>(三目运算符作用与if-else语句类似，运用得当能减少代码量)。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/07/13/test/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="lungyam">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="lungyam's blog">
    </span>

    
    
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/07/13/test/" class="post-title-link" itemprop="url">test</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2020-07-13 16:09:57" itemprop="dateCreated datePublished" datetime="2020-07-13T16:09:57+08:00">2020-07-13</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">Edited on</span>
        <time title="Modified: 2020-07-14 17:49:49" itemprop="dateModified" datetime="2020-07-14T17:49:49+08:00">2020-07-14</time>
      </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p>This is picture test.<br><img src="/images/Java1.jpg" height="50%" width="50%" align="center"></p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/07/06/Java%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="lungyam">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="lungyam's blog">
    </span>

    
    
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/07/06/Java%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B/" class="post-title-link" itemprop="url">Java数据类型</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2020-07-06 16:40:04" itemprop="dateCreated datePublished" datetime="2020-07-06T16:40:04+08:00">2020-07-06</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">Edited on</span>
        <time title="Modified: 2020-07-14 17:42:25" itemprop="dateModified" datetime="2020-07-14T17:42:25+08:00">2020-07-14</time>
      </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p><strong>第一篇博客，从基础知识开始记录吧！</strong></p>
<p>Java是强类型语言，所有的变量都必须显式声明类型（隐式声明不指定类型和大小），并且严格区分大小写（强语言的规定好像都差不多 <del>(￣▽￣)</del>*）。</p>
<p>直接上图：<br><img src="/images/Java1.jpg" alt="Java数据类型" title="Java data types"></p>
<p>Java数据类型分为两大类：基本类型和引用类型。  </p>
<p>基本类型包括：整型、字符型（实际上也是整型）、浮点型、布尔型。</p>
<p>引用类型包括：类、数组、接口和null。引用类型就是引用一个对象（实例和数组），该变量其实就是一个指针（Java中没有指针的说法，但这俩是一个意思，引用类型/指针的初值一般赋为null）。  </p>
<hr>
<p>补充：字符串型(String)是一个类，属于引用类型。</p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
  
  
  

      
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="en">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2020/06/11/hello-world/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="lungyam">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="lungyam's blog">
    </span>

    
    
      <header class="post-header">
        <h2 class="post-title" itemprop="name headline">
          
            <a href="/2020/06/11/hello-world/" class="post-title-link" itemprop="url">Hello World</a>
        </h2>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2020-06-11 11:33:20" itemprop="dateCreated datePublished" datetime="2020-06-11T11:33:20+08:00">2020-06-11</time>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
          <p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>

<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html" target="_blank" rel="noopener">Deployment</a></p>

      
    </div>

    
    
    

    <footer class="post-footer">
        <div class="post-eof"></div>
      
    </footer>
  </article>
  
  
  


  



      

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      const activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      const commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

    </div>
  </main>

  <footer class="footer">
    <div class="footer-inner">
      

      

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">lungyam</span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a>
  </div>

    </div>
  </footer>

  
  <script src="//cdn.jsdelivr.net/npm/animejs@3.2.0/lib/anime.min.js"></script>
<script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script>

  


















  








  

  

</body>
</html>
